package com.coderdream.chapter11.composite.a1;

public class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		try {
			Directory rootdir = new Directory("root");

			Directory usrdir = new Directory("usr");

			rootdir.add(usrdir);

			Directory yuki = new Directory("yuki");


			usrdir.add(yuki);

			File file = new File("Composite.java", 100);
			yuki.add(file);
			rootdir.printList();
			
			System.out.println("");
			System.out.println("file = " + file.getFullName());
			System.out.println("yuki = " + yuki.getFullName());
		} catch (FileTreatmentException e) {
			e.printStackTrace();
		}

	}

}
